﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<hercules.Models.VendaModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Inserir Venda
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<center>

<h2>Inserir Venda</h2>

<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>

<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset style="width: 700px;">
        <legend>Venda</legend>
        
        <table>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.NumeroNota) %>
                    <%: Html.EditorFor(model => model.NumeroNota) %>
                    <%: Html.ValidationMessageFor(model => model.NumeroNota) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.Funcionario, "Funcionário") %>
                    <%: Html.DropDownList("funcionario", String.Empty) %>
                    <%: Html.ValidationMessageFor(model => model.Funcionario) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.Cliente, "Cliente") %>
                    <%: Html.DropDownList("cliente", String.Empty) %>
                    <%: Html.ValidationMessageFor(model => model.Cliente) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.Modelo) %>
                    <%: Html.EditorFor(model => model.Modelo) %>
                    <%: Html.ValidationMessageFor(model => model.Modelo) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.DataEmissao) %>
                    <%: Html.EditorFor(model => model.DataEmissao) %>
                    <%: Html.ValidationMessageFor(model => model.DataEmissao) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.DataSaida) %>
                    <%: Html.EditorFor(model => model.DataSaida) %>
                    <%: Html.ValidationMessageFor(model => model.DataSaida) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.NaturezaCFOP) %>
                    <%: Html.EditorFor(model => model.NaturezaCFOP) %>
                    <%: Html.ValidationMessageFor(model => model.NaturezaCFOP) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.ValorTotal) %>
                    <%: Html.EditorFor(model => model.ValorTotal) %>
                    <%: Html.ValidationMessageFor(model => model.ValorTotal) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.Desconto) %>
                    <%: Html.EditorFor(model => model.Desconto) %>
                    <%: Html.ValidationMessageFor(model => model.Desconto) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.ValorUnitario) %>
                    <%: Html.EditorFor(model => model.ValorUnitario) %>
                    <%: Html.ValidationMessageFor(model => model.ValorUnitario) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.ValorTotalProduto) %>
                    <%: Html.EditorFor(model => model.ValorTotalProduto) %>
                    <%: Html.ValidationMessageFor(model => model.ValorTotalProduto) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.Quantidade) %>
                    <%: Html.EditorFor(model => model.Quantidade) %>
                    <%: Html.ValidationMessageFor(model => model.Quantidade) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.StatusVenda) %>
                    <%: Html.EditorFor(model => model.StatusVenda) %>
                    <%: Html.ValidationMessageFor(model => model.StatusVenda) %>
                </td>
            </tr>
        </table>

        <p>
            <input type="submit" value="Inserir" />
        </p>
    </fieldset>
<% } %>

<div>
    <%: Html.ActionLink("Voltar", "Index") %>
</div>

</center>    

</asp:Content>
